home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / 3d_vb / 3d4vb.bas < prev    next >
Encoding:
BASIC Source File  |  1995-09-06  |  20.7 KB  |  637 lines

  1.  
  2.  
  3.  
  4. Sub BorderBox (Ctrl1 As Control, Ctrl2 As Control, H%)
  5.     OldDWVal = Ctrl2.DrawWidth
  6.     Ctrl2.DrawWidth = 1
  7.     Cleft% = Ctrl1.Left - 15
  8.     CTop% = Ctrl1.Top - 15
  9.     Cwide% = Ctrl1.Width + 20
  10.     Chigh% = Ctrl1.Height + 15
  11.     Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  12.     Ctrl2.Line -Step(0, Chigh%), WHITE
  13.     Ctrl2.Line -Step(-Cwide%, 0), WHITE
  14.     Ctrl2.Line -Step(0, -Chigh%), GRAY
  15.     If H% = 2 Then
  16.         Cleft% = Ctrl1.Left - 30
  17.         CTop% = Ctrl1.Top - 30
  18.         Cwide% = Ctrl1.Width + 50
  19.         Chigh% = Ctrl1.Height + 40
  20.         Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  21.         Ctrl2.Line -Step(0, Chigh%), WHITE
  22.         Ctrl2.Line -Step(-Cwide%, 0), WHITE
  23.         Ctrl2.Line -Step(0, -Chigh%), GRAY
  24.     End If
  25.     Ctrl2.DrawWidth = OldDWVal
  26. End Sub     ' BorderBox()
  27.  
  28.  
  29. Sub BorderBoxOnFrm (Ctrl1 As Control, Ctrl2 As Form)
  30.     OldDWVal = Ctrl2.DrawWidth
  31.     Ctrl2.DrawWidth = 1
  32.     Cleft% = Ctrl1.Left - 15
  33.     CTop% = Ctrl1.Top - 15
  34.     Cwide% = Ctrl1.Width + 20
  35.     Chigh% = Ctrl1.Height + 20
  36.     Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  37.     Ctrl2.Line -Step(0, Chigh%), WHITE
  38.     Ctrl2.Line -Step(-Cwide%, 0), WHITE
  39.     Ctrl2.Line -Step(0, -Chigh%), GRAY
  40.     Cleft% = Ctrl1.Left - 30
  41.     CTop% = Ctrl1.Top - 30
  42.     Cwide% = Ctrl1.Width + 45
  43.     Chigh% = Ctrl1.Height + 45
  44.     Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  45.     Ctrl2.Line -Step(0, Chigh%), WHITE
  46.     Ctrl2.Line -Step(-Cwide%, 0), WHITE
  47.     Ctrl2.Line -Step(0, -Chigh%), GRAY
  48.     Ctrl2.DrawWidth = OldDWVal
  49. End Sub     ' BorderBoxOnFrm()
  50.  
  51. Sub EtchedFrame (Ctrl1 As Control, Text$, Just%, ColorVal, Dimen%)
  52.     OldDWVal = Ctrl1.DrawWidth
  53.     Ctrl1.DrawWidth = 1
  54.     ' 0 = Left, 1 = Right, 2 = Center
  55.     TxLen% = Ctrl1.TextWidth(Text$)
  56.     Ctrl1.ForeColor = ColorVal
  57.     C1Left% = Ctrl1.ScaleLeft + 10
  58.     C1Top% = Ctrl1.ScaleTop + (Ctrl1.TextHeight("I") / 2)
  59.     C1Wide% = Ctrl1.ScaleWidth - 30
  60.     C1High% = (Ctrl1.ScaleHeight - 30)
  61.     C2Left% = Ctrl1.ScaleLeft
  62.     C2Top% = Ctrl1.ScaleTop + ((Ctrl1.TextHeight("I") / 2) - 10)
  63.     C2Wide% = Ctrl1.ScaleWidth - 15
  64.     C2High% = (Ctrl1.ScaleHeight - 10)
  65.     Select Case Just%
  66.     Case Is = 0     ' Left
  67.         L1Start% = C1Left%
  68.         L1End% = 120
  69.         R1Start% = L1End% + TxLen% + 240
  70.         R1End% = C1Wide%
  71.         L2Start% = C2Left%
  72.         L2End% = 110
  73.         R2Start% = L2End% + TxLen% + 240
  74.         R2End% = C2Wide%
  75.         Xpos% = 240
  76.         Ypos% = 0
  77.     Case Is = 1     ' Right
  78.         L1Start% = C1Left%
  79.         L1End% = (C1Wide% - TxLen%) - 350
  80.         R1Start% = C1Wide% - 120
  81.         R1End% = C1Wide%
  82.         L2Start% = C2Left%
  83.         L2End% = (C2Wide% - TxLen%) - 350
  84.         R2Start% = C2Wide% - 130
  85.         R2End% = C2Wide%
  86.         Xpos% = L1End% + 120
  87.         Ypos% = 0
  88.     Case Is = 2     ' Center
  89.         L1Start% = C1Left%
  90.         L1End% = (C1Wide% - (TxLen% + 240)) / 2
  91.         R1Start% = C1Wide% - L1End%
  92.         R1End% = C1Wide%
  93.         L2Start% = C2Left%
  94.         L2End% = (C2Wide% - (TxLen% + 240)) / 2
  95.         R2Start% = C2Wide% - L2End%
  96.         R2End% = C2Wide%
  97.         Xpos% = L1End% + 120
  98.         Ypos% = 0
  99.     End Select
  100.     If Dimen% = ETCHED Then
  101.            Ctrl1.Currentx = Xpos% + 15
  102.            Ctrl1.Currenty = Ypos% + 15
  103.            Ctrl1.ForeColor = WHITE
  104.            Ctrl1.Print Text$
  105.     End If
  106.     If Dimen% = RAISED Then
  107.            Ctrl1.Currentx = Xpos% - 15
  108.            Ctrl1.Currenty = Ypos% - 15
  109.            Ctrl1.ForeColor = WHITE
  110.            Ctrl1.Print Text$
  111.            Ctrl1.Currentx = Xpos% + 15
  112.            Ctrl1.Currenty = Ypos% + 15
  113.            Ctrl1.ForeColor = GRAY
  114.            Ctrl1.Print Text$
  115.     End If
  116.     Ctrl1.Currentx = Xpos%
  117.     Ctrl1.Currenty = Ypos%
  118.     Ctrl1.ForeColor = ColorVal
  119.     Ctrl1.Print Text$
  120.     Ctrl1.Line (L1Start%, C1Top%)-(L1End%, C1Top%), WHITE
  121.     Ctrl1.Line (R1Start%, C1Top%)-(R1End%, C1Top%), WHITE
  122.     Ctrl1.Line (R1End%, C1Top%)-(R1End%, C1High%), GRAY
  123.     Ctrl1.Line (R1End%, C1High%)-(L1Start%, C1High%), GRAY
  124.     Ctrl1.Line (L1Start%, C1High%)-(L1Start%, C1Top%), WHITE
  125.     Ctrl1.Line (L2Start%, C2Top%)-(L2End%, C2Top%), GRAY
  126.     Ctrl1.Line (R2Start%, C2Top%)-(R2End%, C2Top%), GRAY
  127.     Ctrl1.Line (R2End%, C2Top%)-(R2End%, C2High%), WHITE
  128.     Ctrl1.Line (R2End%, C2High%)-(L2Start%, C2High%), WHITE
  129.     Ctrl1.Line (L2Start%, C2High%)-(L2Start%, C2Top%), GRAY
  130.     Ctrl1.DrawWidth = OldDWVal
  131. End Sub     ' EtchedFrame()
  132.  
  133. Sub EtchedFrmLine (Ctrl1 As Form, X1pos%, Y1pos%, X2pos%, Y2pos%)
  134.     OldDWVal = Ctrl1.DrawWidth
  135.     Ctrl1.AutoRedraw = True
  136.     Ctrl1.DrawWidth = 1
  137.     Ctrl1.Line (X1pos%, Y1pos%)-(X2pos%, Y2pos%), GRAY
  138.     Ctrl1.Line (X1pos% + 15, Y1pos% + 15)-(X2pos% + 15, Y2pos% + 15), WHITE
  139.     Ctrl1.DrawWidth = OldDWVal
  140. End Sub     ' EtchedFrmLine()
  141.  
  142. Sub EtchedFrmText (Ctrl1 As Form, Text$, Xpos%, Ypos%, ColorVal)
  143.     OldDWVal = Ctrl1.DrawWidth
  144.     Ctrl1.DrawWidth = 1
  145.     StartColor = Ctrl1.ForeColor
  146.     Ctrl1.Currentx = Xpos% + 15
  147.     Ctrl1.Currenty = Ypos% + 15
  148.     Ctrl1.ForeColor = WHITE
  149.     Ctrl1.Print Text$
  150.     Ctrl1.Currentx = Xpos%
  151.     Ctrl1.Currenty = Ypos%
  152.     Ctrl1.ForeColor = ColorVal
  153.     Ctrl1.Print Text$
  154.     Ctrl1.ForeColor = StartColor
  155.     Ctrl1.DrawWidth = OldDWVal
  156. End Sub     ' EtchedFrmText()
  157.  
  158.  
  159.  
  160. Sub EtchedPicBorder (Ctrl1 As Control)
  161.     OldDWVal = Ctrl1.DrawWidth
  162.     Ctrl1.DrawWidth = 1
  163.     Cleft% = Ctrl1.ScaleLeft + 10
  164.     CTop% = Ctrl1.ScaleTop + 10
  165.     Cwide% = Ctrl1.ScaleWidth - 30
  166.     Chigh% = Ctrl1.ScaleHeight - 30
  167.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  168.     Ctrl1.Line -Step(0, Chigh%), GRAY
  169.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  170.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  171.     Cleft% = Ctrl1.ScaleLeft
  172.     CTop% = Ctrl1.ScaleTop
  173.     Cwide% = Ctrl1.ScaleWidth - 15
  174.     Chigh% = Ctrl1.ScaleHeight - 15
  175.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  176.     Ctrl1.Line -Step(0, Chigh%), WHITE
  177.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  178.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  179.     Ctrl1.DrawWidth = OldDWVal
  180. End Sub ' EtchedPicBorder()
  181.  
  182. Sub EtchedPicText (Ctrl1 As Control, Text$, Xpos%, Ypos%, ColorVal)
  183.     OldDWVal = Ctrl1.DrawWidth
  184.     Ctrl1.DrawWidth = 1
  185.     StartColor = Ctrl1.ForeColor
  186.     Ctrl1.Currentx = Xpos% + 15
  187.     Ctrl1.Currenty = Ypos% + 15
  188.     Ctrl1.ForeColor = WHITE
  189.     Ctrl1.Print Text$
  190.     Ctrl1.Currentx = Xpos%
  191.     Ctrl1.Currenty = Ypos%
  192.     Ctrl1.ForeColor = ColorVal
  193.     Ctrl1.Print Text$
  194.     Ctrl1.ForeColor = StartColor
  195.     Ctrl1.DrawWidth = OldDWVal
  196. End Sub     ' EtchedPicText()
  197.  
  198. Sub FormBorder (Ctrl1 As Form)
  199.     OldDWVal = Ctrl1.DrawWidth
  200.     Ctrl1.DrawWidth = 1
  201.     Cleft% = Ctrl1.ScaleLeft
  202.     CTop% = Ctrl1.ScaleTop
  203.     Cwide% = Ctrl1.ScaleWidth - 15
  204.     Chigh% = Ctrl1.ScaleHeight - 15
  205.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  206.     Ctrl1.Line -Step(0, Chigh%), GRAY
  207.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  208.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  209.     Cleft% = Ctrl1.ScaleLeft + 15
  210.     CTop% = Ctrl1.ScaleTop + 15
  211.     Cwide% = Ctrl1.ScaleWidth - 45
  212.     Chigh% = Ctrl1.ScaleHeight - 45
  213.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  214.     Ctrl1.Line -Step(0, Chigh%), GRAY
  215.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  216.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  217.     Ctrl1.DrawWidth = OldDWVal
  218. End Sub     ' FormBorder()
  219.  
  220.  
  221. Sub FormFrame (Ctrl1 As Form)
  222.     OldDWVal = Ctrl1.DrawWidth
  223.     Ctrl1.DrawWidth = 1
  224.     Cleft% = Ctrl1.ScaleLeft + 60
  225.     CTop% = Ctrl1.ScaleTop + 60
  226.     Cwide% = Ctrl1.ScaleWidth - 130
  227.     Chigh% = Ctrl1.ScaleHeight - 130
  228.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  229.     Ctrl1.Line -Step(0, Chigh%), WHITE
  230.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  231.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  232.     Cleft% = Ctrl1.ScaleLeft
  233.     CTop% = Ctrl1.ScaleTop
  234.     Cwide% = Ctrl1.ScaleWidth - 10
  235.     Chigh% = Ctrl1.ScaleHeight - 10
  236.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  237.     Ctrl1.Line -Step(0, Chigh%), GRAY
  238.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  239.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  240.     Ctrl1.DrawWidth = OldDWVal
  241. End Sub     ' FormFrame()
  242.  
  243.  
  244. Sub HighlightEntry (Source1 As Control)
  245.     Source1.SelStart = 0
  246.     Source1.SelLength = Len(Source1.Text)
  247. End Sub
  248.  
  249. Sub LabelBox (Ctrl1 As Control, Ctrl2 As Control, Text$, Just%, Vert%, ColorVal, Dimen%)
  250.     OldDWVal = Ctrl2.DrawWidth
  251.     Ctrl2.DrawWidth = 1
  252.     Select Case Vert%
  253.     Case Is = 0
  254.         Ypos% = Ctrl1.Top - Ctrl2.TextHeight("I") - 60
  255.     Case Is = 1
  256.         Ypos% = Ctrl1.Top
  257.     Case Is = 2
  258.         Ypos% = Ctrl1.Top + Ctrl1.Height + 60
  259.     End Select
  260.     Select Case Just%
  261.     Case Is = 0     ' Left of Box
  262.         Xpos% = Ctrl1.Left - (Ctrl2.TextWidth(Text$) + 120)
  263.     Case Is = 1     ' Right of Box
  264.         Xpos% = Ctrl1.Left + Ctrl1.Width + 120
  265.     Case Is = 2     ' Centered with Box
  266.         Xpos% = Ctrl1.Left + ((Ctrl1.Width - Ctrl2.TextWidth(Text$)) / 2)
  267.     End Select
  268.     StartColor = Ctrl1.ForeColor
  269.     If Dimen% = ETCHED Then
  270.         Ctrl2.Currentx = Xpos% + 15
  271.         Ctrl2.Currenty = Ypos% + 15
  272.         Ctrl2.ForeColor = WHITE
  273.         Ctrl2.Print Text$
  274.     End If
  275.     If Dimen% = RAISED Then
  276.         Ctrl2.Currentx = Xpos% - 15
  277.         Ctrl2.Currenty = Ypos% - 15
  278.         Ctrl2.ForeColor = WHITE
  279.         Ctrl2.Print Text$
  280.         Ctrl2.Currentx = Xpos% + 15
  281.         Ctrl2.Currenty = Ypos% + 15
  282.         Ctrl2.ForeColor = GRAY
  283.         Ctrl2.Print Text$
  284.     End If
  285.     Ctrl2.Currentx = Xpos%
  286.     Ctrl2.Currenty = Ypos%
  287.     Ctrl2.ForeColor = ColorVal
  288.     Ctrl2.Print Text$
  289.     Ctrl2.DrawWidth = OldDWVal
  290. End Sub     ' LabelBox()
  291.  
  292. Sub LabelBoxOnFrm (Ctrl1 As Control, Ctrl2 As Form, Text$, Just%, Vert%, ColorVal, Dimen%)
  293.     OldDWVal = Ctrl2.DrawWidth
  294.     Ctrl2.DrawWidth = 1
  295.     Select Case Vert%
  296.     Case Is = 0
  297.         Ypos% = Ctrl1.Top - Ctrl2.TextHeight("I") - 60
  298.     Case Is = 1
  299.         Ypos% = Ctrl1.Top
  300.     Case Is = 2
  301.         Ypos% = Ctrl1.Top + Ctrl1.Height + 60
  302.     End Select
  303.     Select Case Just%
  304.     Case Is = 0     ' Left of Box
  305.         Xpos% = Ctrl1.Left - (Ctrl2.TextWidth(Text$) + 120)
  306.     Case Is = 1     ' Right of Box
  307.         Xpos% = Ctrl1.Left + Ctrl1.Width + 120
  308.     Case Is = 2     ' Centered with Box
  309.         Xpos% = Ctrl1.Left + ((Ctrl1.Width - Ctrl2.TextWidth(Text$)) / 2)
  310.     End Select
  311.     StartColor = Ctrl1.ForeColor
  312.     If Dimen% = ETCHED% Then
  313.         Ctrl2.Currentx = Xpos% + 15
  314.         Ctrl2.Currenty = Ypos% + 15
  315.         Ctrl2.ForeColor = WHITE
  316.         Ctrl2.Print Text$
  317.     End If
  318.     If Dimen% = RAISED% Then
  319.         Ctrl2.Currentx = Xpos% - 15
  320.         Ctrl2.Currenty = Ypos% - 15
  321.         Ctrl2.ForeColor = WHITE
  322.         Ctrl2.Print Text$
  323.         Ctrl2.Currentx = Xpos% + 15
  324.         Ctrl2.Currenty = Ypos% + 15
  325.         Ctrl2.ForeColor = GRAY
  326.         Ctrl2.Print Text$
  327.     End If
  328.     Ctrl2.Currentx = Xpos%
  329.     Ctrl2.Currenty = Ypos%
  330.     Ctrl2.ForeColor = ColorVal
  331.     Ctrl2.Print Text$
  332.     Ctrl2.DrawWidth = OldDWVal
  333. End Sub     ' LabelBoxOnFrm()
  334.  
  335.  
  336. Sub LabelInBox (Ctrl1 As Control, Text$, Just%, Vert%, ColorVal, Dimen%)
  337.     OldDWVal = Ctrl1.DrawWidth
  338.     Ctrl1.DrawWidth = 1
  339.     Select Case Just%
  340.     Case Is = 0
  341.         Xpos% = 90
  342.     Case Is = 1
  343.         Xpos% = (Ctrl1.ScaleWidth - Ctrl1.TextWidth(Text$)) - 90
  344.     Case Is = 2
  345.         Xpos% = (Ctrl1.ScaleWidth - Ctrl1.TextWidth(Text$)) / 2
  346.     End Select
  347.     Select Case Vert%
  348.     Case Is = 0
  349.         Ypos% = 90
  350.     Case Is = 1
  351.         Ypos% = ((Ctrl1.ScaleHeight - Ctrl1.TextHeight("I")) / 2)
  352.     Case Is = 2
  353.         Ypos% = Ctrl1.ScaleHeight - (Ctrl1.TextHeight("I") + 90)
  354.     End Select
  355.     StartColor = Ctrl1.ForeColor
  356.     If Dimen% = ETCHED Then
  357.         Ctrl1.Currentx = Xpos% + 15
  358.         Ctrl1.Currenty = Ypos% + 15
  359.         Ctrl1.ForeColor = WHITE
  360.         Ctrl1.Print Text$
  361.     End If
  362.     If Dimen% = RAISED Then
  363.         Ctrl1.Currentx = Xpos% - 15
  364.         Ctrl1.Currenty = Ypos% - 15
  365.         Ctrl1.ForeColor = WHITE
  366.         Ctrl1.Print Text$
  367.         Ctrl1.Currentx = Xpos% + 15
  368.         Ctrl1.Currenty = Ypos% + 15
  369.         Ctrl1.ForeColor = GRAY
  370.         Ctrl1.Print Text$
  371.     End If
  372.     Ctrl1.Currentx = Xpos%
  373.     Ctrl1.Currenty = Ypos%
  374.     Ctrl1.ForeColor = ColorVal
  375.     Ctrl1.Print Text$
  376.     Ctrl1.DrawWidth = OldDWVal
  377. End Sub     ' LabelInBox()
  378.  
  379.  
  380.  
  381. Sub PicFrame (Ctrl1 As Control)
  382.     OldDWVal = Ctrl1.DrawWidth
  383.     Ctrl1.DrawWidth = 1
  384.     Cleft% = Ctrl1.ScaleLeft + 60
  385.     CTop% = Ctrl1.ScaleTop + 60
  386.     Cwide% = Ctrl1.ScaleWidth - 130
  387.     Chigh% = Ctrl1.ScaleHeight - 130
  388.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  389.     Ctrl1.Line -Step(0, Chigh%), WHITE
  390.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  391.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  392.     Cleft% = Ctrl1.ScaleLeft
  393.     CTop% = Ctrl1.ScaleTop
  394.     Cwide% = Ctrl1.ScaleWidth - 10
  395.     Chigh% = Ctrl1.ScaleHeight - 10
  396.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  397.     Ctrl1.Line -Step(0, Chigh%), GRAY
  398.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  399.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  400.     Ctrl1.DrawWidth = OldDWVal
  401. End Sub     ' PicFrame()
  402.  
  403.  
  404. Sub PicFramedPaint (Ctrl1 As Control)
  405.     OldDM = Ctrl1.DrawMode
  406.     Ctrl1.DrawMode = 6
  407.     Ctrl1.Line (75, 75)-(Ctrl1.ScaleWidth - 75, Ctrl1.ScaleHeight - 75), , BF
  408.     Ctrl1.DrawMode = OldDM
  409. End Sub     ' PicFramedPaint()
  410.  
  411. Sub PicPaint (Ctrl1 As Control)
  412.     OldDM = Ctrl1.DrawMode
  413.     Ctrl1.DrawMode = 6
  414.     Ctrl1.Line (0, 0)-(Ctrl1.ScaleWidth, Ctrl1.ScaleHeight), , BF
  415.     Ctrl1.DrawMode = OldDM
  416. End Sub     ' PicPaint()
  417.  
  418. Sub RaisedBorderBox (Ctrl1 As Control, Ctrl2 As Control)
  419.     OldDWVal = Ctrl2.DrawWidth
  420.     Ctrl2.AutoRedraw = True
  421.     Cleft% = Ctrl1.Left - 20
  422.     CTop% = Ctrl1.Top - 20
  423.     Cwide% = Ctrl1.Width + 25
  424.     Chigh% = Ctrl1.Height + 25
  425.     Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  426.     Ctrl2.Line -Step(0, Chigh%), GRAY
  427.     Ctrl2.Line -Step(-Cwide%, 0), GRAY
  428.     Ctrl2.Line -Step(0, -Chigh%), WHITE
  429.     Cleft% = Ctrl1.Left - 35
  430.     CTop% = Ctrl1.Top - 35
  431.     Cwide% = Ctrl1.Width + 60
  432.     Chigh% = Ctrl1.Height + 60
  433.     Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  434.     Ctrl2.Line -Step(0, Chigh%), GRAY
  435.     Ctrl2.Line -Step(-Cwide%, 0), GRAY
  436.     Ctrl2.Line -Step(0, -Chigh%), WHITE
  437.     Ctrl2.DrawWidth = OldDWVal
  438. End Sub     ' RaisedBorderBox()
  439.  
  440. Sub RaisedFormEdge (Ctrl1 As Form)
  441.     OldDWVal = Ctrl1.DrawWidth
  442.     Ctrl1.DrawWidth = 1
  443.     Cleft% = Ctrl1.ScaleLeft + 20
  444.     CTop% = Ctrl1.ScaleTop + 20
  445.     Cwide% = Ctrl1.ScaleWidth - 60
  446.     Chigh% = Ctrl1.ScaleHeight - 60
  447.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  448.     Ctrl1.Line -Step(0, Chigh%), WHITE
  449.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  450.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  451.     Cleft% = Ctrl1.ScaleLeft
  452.     CTop% = Ctrl1.ScaleTop
  453.     Cwide% = Ctrl1.ScaleWidth - 20
  454.     Chigh% = Ctrl1.ScaleHeight - 20
  455.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  456.     Ctrl1.Line -Step(0, Chigh%), GRAY
  457.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  458.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  459.     Ctrl1.DrawWidth = OldDWVal
  460. End Sub     ' RaisedFormEdge()
  461.  
  462. Sub RaisedFrmText (Ctrl1 As Form, Text$, Xpos%, Ypos%, ColorVal)
  463.     OldDWVal = Ctrl1.DrawWidth
  464.     Ctrl1.AutoRedraw = True
  465.     StartColor = Ctrl1.ForeColor
  466.     Ctrl1.Currentx = Xpos% - 15
  467.     Ctrl1.Currenty = Ypos% - 15
  468.     Ctrl1.ForeColor = WHITE
  469.     Ctrl1.Print Text$
  470.     Ctrl1.Currentx = Xpos% + 15
  471.     Ctrl1.Currenty = Ypos% + 15
  472.     Ctrl1.ForeColor = GRAY
  473.     Ctrl1.Print Text$
  474.     Ctrl1.Currentx = Xpos%
  475.     Ctrl1.Currenty = Ypos%
  476.     Ctrl1.ForeColor = ColorVal
  477.     Ctrl1.Print Text$
  478.     Ctrl1.ForeColor = StartColor
  479.     Ctrl1.DrawWidth = OldDWVal
  480. End Sub     ' RaisedFrmText()
  481.  
  482. Sub RaisedPicBorder (Ctrl1 As Control, Height%)
  483.     OldDWVal = Ctrl1.DrawWidth
  484.     Ctrl1.DrawWidth = 1
  485.     Cleft% = Ctrl1.ScaleLeft
  486.     CTop% = Ctrl1.ScaleTop
  487.     Cwide% = Ctrl1.ScaleWidth - 15
  488.     Chigh% = Ctrl1.ScaleHeight - 15
  489.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  490.     Ctrl1.Line -Step(0, Chigh%), GRAY
  491.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  492.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  493.     If Height% = 2 Then
  494.         Cleft% = Ctrl1.ScaleLeft + 15
  495.         CTop% = Ctrl1.ScaleTop + 15
  496.         Cwide% = Ctrl1.ScaleWidth - 45
  497.         Chigh% = Ctrl1.ScaleHeight - 45
  498.         Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  499.         Ctrl1.Line -Step(0, Chigh%), GRAY
  500.         Ctrl1.Line -Step(-Cwide%, 0), GRAY
  501.         Ctrl1.Line -Step(0, -Chigh%), WHITE
  502.     End If
  503.     Ctrl1.DrawWidth = OldDWVal
  504. End Sub     ' RaisedPicBorder()
  505.  
  506. Sub RaisedPicEdge (Ctrl1 As Control)
  507.     OldDWVal = Ctrl1.DrawWidth
  508.     Ctrl1.DrawWidth = 1
  509.     Cleft% = Ctrl1.ScaleLeft + 10
  510.     CTop% = Ctrl1.ScaleTop + 10
  511.     Cwide% = Ctrl1.ScaleWidth - 45
  512.     Chigh% = Ctrl1.ScaleHeight - 40
  513.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  514.     Ctrl1.Line -Step(0, Chigh%), WHITE
  515.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  516.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  517.     Cleft% = Ctrl1.ScaleLeft
  518.     CTop% = Ctrl1.ScaleTop
  519.     Cwide% = Ctrl1.ScaleWidth - 15
  520.     Chigh% = Ctrl1.ScaleHeight - 15
  521.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  522.     Ctrl1.Line -Step(0, Chigh%), GRAY
  523.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  524.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  525.     Ctrl1.DrawWidth = OldDWVal
  526. End Sub     ' RaisedPicEdge()
  527.  
  528. Sub RaisedPicText (Ctrl1 As Control, Text$, Xpos%, Ypos%, ColorVal)
  529.     OldDWVal = Ctrl1.DrawWidth
  530.     Ctrl1.DrawWidth = 1
  531.     StartColor = Ctrl1.ForeColor
  532.     Ctrl1.Currentx = Xpos% - 15
  533.     Ctrl1.Currenty = Ypos% - 15
  534.     Ctrl1.ForeColor = WHITE
  535.     Ctrl1.Print Text$
  536.     Ctrl1.Currentx = Xpos% + 15
  537.     Ctrl1.Currenty = Ypos% + 15
  538.     Ctrl1.ForeColor = GRAY
  539.     Ctrl1.Print Text$
  540.     Ctrl1.Currentx = Xpos%
  541.     Ctrl1.Currenty = Ypos%
  542.     Ctrl1.ForeColor = ColorVal
  543.     Ctrl1.Print Text$
  544.     Ctrl1.ForeColor = StartColor
  545.     Ctrl1.DrawWidth = OldDWVal
  546. End Sub     ' RaisedPicText()
  547.  
  548.  
  549.  
  550. Sub ShadowFormFrame (Ctrl1 As Form)
  551.     OldDWVal = Ctrl1.DrawWidth
  552.     Ctrl1.DrawWidth = 1
  553.     Cleft% = Ctrl1.ScaleLeft + 60
  554.     CTop% = Ctrl1.ScaleTop + 60
  555.     Cwide% = Ctrl1.ScaleWidth - 130
  556.     Chigh% = Ctrl1.ScaleHeight - 130
  557.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  558.     Ctrl1.Line -Step(0, Chigh%), GRAY
  559.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  560.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  561.     Cleft% = Ctrl1.ScaleLeft
  562.     CTop% = Ctrl1.ScaleTop
  563.     Cwide% = Ctrl1.ScaleWidth - 10
  564.     Chigh% = Ctrl1.ScaleHeight - 10
  565.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  566.     Ctrl1.Line -Step(0, Chigh%), WHITE
  567.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  568.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  569.     Ctrl1.DrawWidth = OldDWVal
  570. End Sub     ' ShadowFormFrame()
  571.  
  572. Sub ShadowPicBorder (Ctrl1 As Control, Depth%)
  573.     OldDWVal = Ctrl1.DrawWidth
  574.     Ctrl1.DrawWidth = 1
  575.     Cleft% = Ctrl1.ScaleLeft
  576.     CTop% = Ctrl1.ScaleTop
  577.     Cwide% = Ctrl1.ScaleWidth - 15
  578.     Chigh% = Ctrl1.ScaleHeight - 15
  579.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  580.     Ctrl1.Line -Step(0, Chigh%), WHITE
  581.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  582.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  583.     If Depth% = 2 Then
  584.         Cleft% = Ctrl1.ScaleLeft + 15
  585.         CTop% = Ctrl1.ScaleTop + 15
  586.         Cwide% = Ctrl1.ScaleWidth - 45
  587.         Chigh% = Ctrl1.ScaleHeight - 45
  588.         Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  589.         Ctrl1.Line -Step(0, Chigh%), WHITE
  590.         Ctrl1.Line -Step(-Cwide%, 0), WHITE
  591.         Ctrl1.Line -Step(0, -Chigh%), GRAY
  592.     End If
  593.     Ctrl1.DrawWidth = OldDWVal
  594. End Sub     ' ShadowPicBorder()
  595.  
  596.  
  597. Sub ShadowPicFrame (Ctrl1 As Control, Depth%)
  598.     OldDWVal = Ctrl1.DrawWidth
  599.     Ctrl1.AutoRedraw = True
  600.     Cleft% = Ctrl1.ScaleLeft + 60
  601.     CTop% = Ctrl1.ScaleTop + 60
  602.     Cwide% = Ctrl1.ScaleWidth - 145
  603.     Chigh% = Ctrl1.ScaleHeight - 145
  604.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  605.     Ctrl1.Line -Step(0, Chigh%), GRAY
  606.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  607.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  608.     Cleft% = Ctrl1.ScaleLeft
  609.     CTop% = Ctrl1.ScaleTop
  610.     Cwide% = Ctrl1.ScaleWidth - 15
  611.     Chigh% = Ctrl1.ScaleHeight - 15
  612.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  613.     Ctrl1.Line -Step(0, Chigh%), WHITE
  614.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  615.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  616.     If Depth% = 2 Then
  617.         Cleft% = Ctrl1.ScaleLeft + 15
  618.         CTop% = Ctrl1.ScaleTop + 15
  619.         Cwide% = Ctrl1.ScaleWidth - 35
  620.         Chigh% = Ctrl1.ScaleHeight - 35
  621.         Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  622.         Ctrl1.Line -Step(0, Chigh%), WHITE
  623.         Ctrl1.Line -Step(-Cwide%, 0), WHITE
  624.         Ctrl1.Line -Step(0, -Chigh%), GRAY
  625.         Cleft% = Ctrl1.ScaleLeft + 75
  626.         CTop% = Ctrl1.ScaleTop + 75
  627.         Cwide% = Ctrl1.ScaleWidth - 175
  628.         Chigh% = Ctrl1.ScaleHeight - 175
  629.         Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  630.         Ctrl1.Line -Step(0, Chigh%), GRAY
  631.         Ctrl1.Line -Step(-Cwide%, 0), GRAY
  632.         Ctrl1.Line -Step(0, -Chigh%), WHITE
  633.     End If
  634.     Ctrl1.DrawWidth = OldDWVal
  635. End Sub     ' ShadowPicFrame()
  636.  
  637.